package EncryptionTools;

public class XOR {

    public static byte[] xorOperation(byte[] input1, byte[] input2) {
        if (input1.length != input2.length) {
            throw new IllegalArgumentException("Input arrays must have the same length");
        }

        byte[] result = new byte[input1.length];
        for (int i = 0; i < input1.length; i++) {
            result[i] = (byte) (input1[i] ^ input2[i]);
        }
        return result;
    }
}
